Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Moje AutoItowe twory :D


Rekomendowane odpowiedzi

Opublikowano

Zamieszczam tutaj kod, do moich kilku auto-itowych skryptów, jakie napisałem na początku swojej działalności:

 

Kostka do gry ("rzuca" wybraną liczbą kości, i wyświetla wyniki w MsgBoxie)

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt ("GuiOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Kostka", 140, 67, 192, 114)
$Input1 = GUICtrlCreateInput("Ilosć kosci", 8, 8, 121, 21)
$Button1 = GUICtrlCreateButton("Rzuć!", 8, 40, 123, 25)
GuiSetOnEvent ($GUI_EVENT_CLOSE, "quit")
GUICtrlSetOnEvent ($Button1, "rzuc")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Func quit()
Exit
EndFunc

Func rzuc()
$read = GUICtrlRead ($Input1)
If StringIsInt ($read) Then
While $read > 0
$tmp = Random (1, 6, 1)
MsgBox (0, "Wyrzuciłes...", $tmp)
$read = $read - 1
WEnd
Else
MsgBox (16, "Błąd", "Nieprawidłowa ilosć kosci!")
EndIf
EndFunc

While 1
Sleep (100)
WEnd

 

 

IniCreator (pomaga w tworzeniu plików .ini)

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
Opt ("GuiOnEventMode", 1)
#Region ### START Koda GUI section ### Form=c:\documents and settings\wojtek_admin\moje dokumenty\autoit\inicreator\ic.kxf
$ic = GUICreate("IniCreator", 396, 246, 192, 114)
$group_section = GUICtrlCreateGroup("Tworzenie sekcji", 8, 8, 185, 105)
$Label1 = GUICtrlCreateLabel("Nazwa sekcji", 16, 32, 79, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$section_name = GUICtrlCreateInput("", 16, 56, 169, 21)
$section_create = GUICtrlCreateButton("Stwórz sekcję", 16, 80, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$group_key = GUICtrlCreateGroup("Tworzenie klucza", 200, 8, 185, 161)
$Label2 = GUICtrlCreateLabel("Nazwa klucza", 208, 32, 83, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$key_name = GUICtrlCreateInput("", 208, 56, 169, 21)
$Label3 = GUICtrlCreateLabel("Zawartosć klucza", 208, 88, 104, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$key_value = GUICtrlCreateInput("", 208, 112, 169, 21)
$key_create = GUICtrlCreateButton("Stwórz klucz", 208, 136, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$look = GUICtrlCreateEdit("", 8, 144, 185, 89)
GUICtrlSetData(-1, "")
$Label4 = GUICtrlCreateLabel("Podgląd", 80, 120, 50, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$ini_save = GUICtrlCreateButton("Zapisz plik", 200, 176, 90, 25)
$end = GUICtrlCreateButton("Wyjscie", 200, 208, 90, 25)
$help = GUICtrlCreateButton("Pomoc", 296, 176, 90, 25)
$look_clear = GUICtrlCreateButton("Wyczysć podgląd", 296, 208, 90, 25)
GUICtrlSetOnEvent ($end, "_end")
GUICtrlSetOnEvent ($help, "_help")
GUICtrlSetOnEvent ($look_clear, "_look_clear")
GUICtrlSetOnEvent ($ini_save, "_ini_save")
GUICtrlSetOnEvent ($section_create, "_section_create")
GUICtrlSetOnEvent ($key_create, "_key_create")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Local $tmp
Local $tmp2

Func _end()
$tmp = MsgBox (32+4, "Pytanie", "Czy na pewno chcesz wyjsć?")
If $tmp = 6 Then
Exit
EndIf
EndFunc

Func _help()
MsgBox (64, "Pomoc", "IniCreator v1.0 by Phoenix_PL"&@CRLF&"Ten program słuzy do tworzenia plików .ini (plików z ustawieniami), i zapisywania ich."&@CRLF&@CRLF&"Podgląd, czyli co to sekcja, klucz, i zawartosć klucza:"&@CRLF&@CRLF&"[sekcja]"&@CRLF&"klucz=zawartosć klucza"&@CRLF&@CRLF&"Wskazówka: ostatecznie zapisywana zawartosć pliku .ini jest w okienku ""podgląd"", więc zanim go zapiszesz, mozesz własnoręcznie wyedytować tę zawartosć.")
EndFunc

Func _look_clear()
$tmp = MsgBox (48+4, "Uwaga!", "Czy na pewno chcesz usunąć podgląd? Stracisz wszystkie niezapisane zmiany!")
If $tmp = 6 Then
_GUICtrlEdit_SetText ($look, "")
EndIf
EndFunc

Func _ini_save()
$tmp = FileSaveDialog ("Poszukiwanie miejsca do zapisu pliku .ini", @DesktopDir, "Pliki ini (*.ini)", 2)
StringReplace ($tmp, "|", "\")

If $tmp = ("") Then
MsgBox (16, "Błąd!", "Zapisywanie anulowane")
Else
$tmp = ($tmp&".ini")
$tmp2 = _GUICtrlEdit_GetText ($look)
FileOpen ($tmp2, 2+8)
FileWrite ($tmp, $tmp2)
EndIf
EndFunc

Func _section_create()
$tmp = GUICtrlRead ($section_name)
$tmp = ("["&$tmp&"]")
_GUICtrlEdit_AppendText ($look, $tmp&@CRLF)
EndFunc

Func _key_create()
$tmp = GUICtrlRead ($key_name)
$tmp2 = GUICtrlRead ($key_value)
$tmp = ($tmp&"="&$tmp2)
_GUICtrlEdit_AppendText ($look, $tmp&@CRLF)
EndFunc

While 1
Sleep (100)
WEnd

 

 

Kalkulator (podstawowe działania + potęgowanie)

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Wojtek_Admin\Moje dokumenty\AutoIt\WinExec\calc.kxf
$calc = GUICreate("Kalkulator", 319, 204, 192, 117)
$b7 = GUICtrlCreateButton("7", 8, 40, 67, 25)
$b8 = GUICtrlCreateButton("8", 80, 40, 67, 25)
$b9 = GUICtrlCreateButton("9", 152, 40, 67, 25)
$b4 = GUICtrlCreateButton("4", 8, 72, 67, 25)
$b5 = GUICtrlCreateButton("5", 80, 72, 67, 25)
$b6 = GUICtrlCreateButton("6", 152, 72, 67, 25)
$b1 = GUICtrlCreateButton("1", 8, 104, 67, 25)
$b2 = GUICtrlCreateButton("2", 80, 104, 67, 25)
$b3 = GUICtrlCreateButton("3", 152, 104, 67, 25)
$b0 = GUICtrlCreateButton("0", 8, 136, 67, 25)
$rownasie = GUICtrlCreateButton("=", 152, 136, 67, 25)
$plus = GUICtrlCreateButton("+", 240, 40, 75, 25)
$minus = GUICtrlCreateButton("-", 240, 72, 75, 25)
$razy = GUICtrlCreateButton("*", 240, 104, 75, 25)
$dziel = GUICtrlCreateButton("/", 240, 136, 75, 25)
$koniec = GUICtrlCreateButton("Wyjscie", 8, 176, 59, 25)
$czyscall = GUICtrlCreateButton("Czysc wszystko", 72, 176, 83, 25)
$czysc1 = GUICtrlCreateButton("Czysc ekran 1", 160, 176, 75, 25)
$czysc2 = GUICtrlCreateButton("Czysc ekran 2", 240, 176, 75, 25)
$pole1 = GUICtrlCreateInput("", 8, 16, 137, 21)
$pole2 = GUICtrlCreateInput("", 176, 16, 137, 21)
$znak = GUICtrlCreateLabel("", 160, 16, 10, 10)
$potega = GUICtrlCreateButton("x^y", 80, 136, 67, 25)
GuiSetOnEvent($GUI_EVENT_CLOSE, "koniec")
GuiCtrlSetOnEvent ($koniec, "koniec")
GuiCtrlSetOnEvent ($b0, "num0")
GuiCtrlSetOnEvent ($b1, "num1")
GuiCtrlSetOnEvent ($b2, "num2")
GuiCtrlSetOnEvent ($b3, "num3")
GuiCtrlSetOnEvent ($b4, "num4")
GuiCtrlSetOnEvent ($b5, "num5")
GuiCtrlSetOnEvent ($b6, "num6")
GuiCtrlSetOnEvent ($b7, "num7")
GuiCtrlSetOnEvent ($b8, "num8")
GuiCtrlSetOnEvent ($b9, "num9")
GUICtrlSetOnEvent ($czyscall, "czysc")
GUICtrlSetOnEvent ($plus, "dodaj")
GUICtrlSetOnEvent ($minus, "minus")
GUICtrlSetOnEvent ($razy, "razy")
GUICtrlSetOnEvent ($dziel, "podziel")
GUICtrlSetOnEvent ($czysc1, "czysc1")
GUICtrlSetOnEvent ($czysc2, "czysc2")
GUICtrlSetOnEvent ($rownasie, "wynik")
GuiCtrlSetOnEvent ($potega, "potega")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 5
Sleep(10)
WEnd

Func koniec()
Exit
EndFunc

Func num0()
$tmp = GuiCtrlRead ($znak)
$txt = ("0")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num1()
$tmp = GuiCtrlRead ($znak)
$txt = ("1")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num2()
$tmp = GuiCtrlRead ($znak)
$txt = ("2")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num3()
$tmp = GuiCtrlRead ($znak)
$txt = ("3")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num4()
$tmp = GuiCtrlRead ($znak)
$txt = ("4")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num5()
$tmp = GuiCtrlRead ($znak)
$txt = ("5")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num6()
$tmp = GuiCtrlRead ($znak)
$txt = ("6")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num7()
$tmp = GuiCtrlRead ($znak)
$txt = ("7")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num8()
$tmp = GuiCtrlRead ($znak)
$txt = ("8")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func num9()
$tmp = GuiCtrlRead ($znak)
$txt = ("9")
If $tmp = ("") Then
_GUICtrlEdit_AppendText($pole1, $txt)
EndIf

If $tmp = ("+") or $tmp = ("-") or $tmp = ("*") or $tmp = ("/") or $tmp = ("^") then
_GUICtrlEdit_AppendText($pole2, $txt)
EndIf
EndFunc

Func czysc()
$txt = ("")
_GUICtrlEdit_SetText($pole1, $txt)
_GUICtrlEdit_SetText ($pole2, $txt)
$znak = GUICtrlCreateLabel("", 160, 16, 9, 17)
EndFunc

Func dodaj()
GUICtrlSetData ($znak, "+")
EndFunc

Func minus()
GUICtrlSetData ($znak, "-")
EndFunc

Func podziel()
GUICtrlSetData ($znak, "/")
EndFunc

Func razy()
GUICtrlSetData ($znak, "*")
EndFunc

Func czysc1()
GUICtrlSetData ($pole1, "")
EndFunc

Func czysc2()
GUICtrlSetData ($pole2, "")
EndFunc

Func wynik()
$wyn1 = _GuiCtrlEdit_GetText ($pole1)
$wyn2 = _GUICtrlEdit_GetText ($pole2)
$txt = GuiCtrlRead ($znak)

If $txt = ("+") Then
MsgBox (64, "Wynik", $wyn1 + $wyn2)
EndIf

If $txt = ("-") Then
MsgBox (64, "Wynik", $wyn1 - $wyn2)
EndIf

If $txt = ("*") Then
MsgBox (64, "Wynik", $wyn1 * $wyn2)
EndIf

If $txt = ("/") Then
MsgBox (64, "Wynik", $wyn1 / $wyn2)
EndIf

If $txt = ("") Then
MsgBox (48, "Błąd!", "Najpierw wybierz typ działania, i wpisz drugą liczbę!")
EndIf

If $txt = ("/") And $wyn1 = ("0") or $wyn2 = ("0") Then
MsgBox (48, "Uh oh!", "Pamiętaj, nigdy nie dziel przez zero!")
EndIf
If $txt = ("^") Then
MsgBox (64, "Wynik", $wyn1 ^ $wyn2)
EndIf
EndFunc

Func potega()
GuiCtrlSetData ($znak, "^")
EndFunc

 

 

AutoIt AutoScrypter (program który generuje niektóre funkcje AutoIt, jeden z moich pierwszych, może go kiedyś skończę :))

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
Opt ("GuiOnEventMode", 1)
#Region ### START Koda GUI section ###
$autoscripter = GUICreate("AutoIt AutoSkrypter by Phoenix_PL", 758, 598, 207, 114)
$mousemove = GUICtrlCreateGroup("Ruch myszą", 0, 0, 113, 129)
$mouse_x = GUICtrlCreateInput("Punkt X", 8, 16, 97, 21)
$mouse_y = GUICtrlCreateInput("Punkt Y", 8, 40, 97, 21)
$mouse_move = GUICtrlCreateButton("Rusz myszą", 8, 64, 99, 25)
$mouse_click = GUICtrlCreateButton("Wywołaj kliknięcie", 8, 96, 99, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$koniec = GUICtrlCreateButton("Wyjscie", 296, 568, 67, 25)
$msgboxcreate = GUICtrlCreateGroup("Okienko z informacją (MsgBox)", 120, 0, 241, 129)
$msg_belka = GUICtrlCreateInput("Napis na belce tytułowej", 128, 16, 225, 21)
$msg_text = GUICtrlCreateInput("Zawartość okienka", 128, 40, 225, 21)
$msg_type = GUICtrlCreateInput("Typ okna (kliknij 'Pomoc')", 128, 64, 225, 21)
$msg_create = GUICtrlCreateButton("Stwórz okno", 128, 88, 227, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$txtenter = GUICtrlCreateButton("Wpisz do SciTE", 0, 568, 131, 25)
$code = GUICtrlCreateEdit("", 0, 424, 361, 137)
GUICtrlSetData(-1, "code")
$txt1 = GUICtrlCreateLabel("Tutaj będzie się pojawiać wygenerowany kod", 48, 400, 260, 17)
GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
$zmienne = GUICtrlCreateGroup("Zmienne", 368, 0, 193, 105)
$zmienna_zawart = GUICtrlCreateInput("Zawartość zmiennej", 376, 40, 177, 21)
$zmienna_dec = GUICtrlCreateButton("Zadeklaruj", 376, 64, 179, 33)
$zmienna_name = GUICtrlCreateInput("Nazwa zmiennej", 376, 16, 177, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$gui_form = GUICtrlCreateGroup("GUI - Tworzenie formatki", 0, 136, 177, 121)
$form_id = GUICtrlCreateInput("ID Formatki", 8, 152, 161, 21)
$form_belka = GUICtrlCreateInput("Napis na belce tytułowej", 8, 176, 161, 21)
$form_pos = GUICtrlCreateInput("Rozmiar formatki (kliknij 'Pomoc')", 8, 200, 161, 21)
$form_create = GUICtrlCreateButton("Stwórz formatkę", 8, 224, 163, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$help = GUICtrlCreateButton("Pomoc", 232, 568, 59, 25)
$gui_func = GUICtrlCreateGroup("Funkcje", 184, 136, 177, 169)
$func_name = GUICtrlCreateInput("Nazwa funkcji", 192, 152, 161, 21)
$func_instr = GUICtrlCreateEdit("", 192, 176, 161, 89)
GUICtrlSetData(-1, "func_instr")
$func_create = GUICtrlCreateButton("Stwórz funkcję", 192, 272, 163, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$gui_button = GUICtrlCreateGroup("GUI - Tworzenie przycisku", 368, 112, 193, 121)
$button_id = GUICtrlCreateInput("ID Przycisku", 376, 128, 177, 21)
$button_text = GUICtrlCreateInput("Tekst na przycisku", 376, 152, 177, 21)
$button_pos = GUICtrlCreateInput("Pozycja przycisku (kliknij 'Pomoc')", 376, 176, 177, 21)
$button_create = GUICtrlCreateButton("Stwórz przycisk", 376, 200, 179, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$gui_label = GUICtrlCreateGroup("GUI - Tworzenie etykiety", 0, 264, 177, 129)
$label_id = GUICtrlCreateInput("ID Etykiety", 8, 280, 161, 21)
$label_text = GUICtrlCreateInput("Tekst etykiety", 8, 304, 161, 21)
$label_pos = GUICtrlCreateInput("Pozycja etykiety (kliknij 'Pomoc')", 8, 328, 161, 21)
$label_create = GUICtrlCreateButton("Stwórz ektykietę", 8, 360, 163, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$gui_input = GUICtrlCreateGroup("GUI - Tworzenie 'wejscia'", 368, 240, 193, 121)
$input_id = GUICtrlCreateInput("ID 'Wejscia'", 376, 256, 177, 21)
$input_text = GUICtrlCreateInput("Tekst w 'wejsciu'", 376, 280, 177, 21)
$input_pos = GUICtrlCreateInput("Pozycja 'wejscia'", 376, 304, 177, 21)
$input_create = GUICtrlCreateButton("Stwórz 'wejscie'", 376, 328, 179, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$gui_options = GUICtrlCreateGroup("GUI - Opcje", 184, 312, 177, 81)
$gui_event = GUICtrlCreateButton("Aktywuj OnEventMode", 192, 328, 163, 25)
$includelib = GUICtrlCreateButton("Zaincluduj biblioteki GUI", 192, 360, 163, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$oneventact = GUICtrlCreateGroup("Tworzenie akcji OnEvent", 368, 368, 193, 97)
$onevent_id = GUICtrlCreateInput("ID Przycisku", 376, 384, 177, 21)
$onevent_func = GUICtrlCreateInput("Funkcja, która ma być wykonana", 376, 408, 177, 21)
$onevent_create = GUICtrlCreateButton("Stwórz akcję", 376, 432, 179, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$osversion = GUICtrlCreateLabel("osversion", 368, 472, 89, 49)
$osservicepack = GUICtrlCreateLabel("osservicepack", 464, 472, 97, 41)
$cleancode = GUICtrlCreateButton("Czysć kod", 136, 568, 91, 25)
$slpgroup = GUICtrlCreateGroup("Uspienie aplikacji", 368, 520, 193, 73)
$sleep_time = GUICtrlCreateInput("Czas upienia (ms) (1000 ms = 1s)", 376, 536, 177, 21)
$sleep_create = GUICtrlCreateButton("Stwórz uspienie", 376, 560, 179, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$libgroup = GUICtrlCreateGroup("Dodawanie bibliotek", 568, 0, 185, 73)
$lib_name = GUICtrlCreateInput("Nazwa biblioteki (kliknij 'Pomoc')", 576, 16, 169, 21)
$lib_create = GUICtrlCreateButton("Dodaj bibliotekę", 576, 40, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$ifinstr = GUICtrlCreateGroup("Instrukcja warunkowa", 568, 80, 185, 169)
$if_warns = GUICtrlCreateInput("Warunki (kliknij 'Pomoc')", 576, 96, 169, 21)
$if_instr = GUICtrlCreateEdit("", 576, 120, 169, 89)
GUICtrlSetData(-1, "if_instr")
$if_create = GUICtrlCreateButton("Stwórz instrukcję", 576, 216, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$sendgroup = GUICtrlCreateGroup("Wpisywanie klawiszy", 568, 256, 185, 73)
$send_keys = GUICtrlCreateInput("Klawisze (kliknij 'Pomoc')", 576, 272, 169, 21)
$send_create = GUICtrlCreateButton("OK", 576, 296, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$numgroup = GUICtrlCreateGroup("Losowanie liczb", 568, 336, 185, 97)
$num_min = GUICtrlCreateInput("Liczba minimalna (opcjonalnie)", 576, 352, 169, 21)
$num_max = GUICtrlCreateInput("Liczba maksymalna (opcjonalnie)", 576, 376, 169, 21)
$num_ok = GUICtrlCreateButton("OK", 576, 400, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$apprun = GUICtrlCreateGroup("Uruchamianie aplikacji", 568, 440, 185, 97)
$app_name = GUICtrlCreateInput("Nazwa aplikacji (kliknij 'Pomoc')", 576, 456, 169, 21)
$apppath = GUICtrlCreateInput("Sciezka do aplikacji (opcjonalnie)", 576, 480, 169, 21)
$app_ok = GUICtrlCreateButton("OK", 576, 504, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
GUICtrlSetOnEvent ($koniec, "wyjdz")
GUICtrlSetOnEvent ($help, "helpmsg")
GUICtrlSetOnEvent ($txtenter, "txttonotepad")
GUICtrlSetOnEvent ($gui_event, "actonevent")
GUICtrlSetOnEvent ($includelib, "inclib")
GUICtrlSetOnEvent ($cleancode, "clear")
GUICtrlSetOnEvent ($mouse_move, "mousemovegen")
GUICtrlSetOnEvent ($mouse_click, "mouseclickgen")
GUICtrlSetOnEvent ($sleep_create, "sleepgen")
GUICtrlSetOnEvent ($msg_create, "msgboxgen")
GUICtrlSetOnEvent ($zmienna_dec, "varcreate")
GUICtrlSetOnEvent ($lib_create, "incuserlib")
GUICtrlSetOnEvent ($form_create, "guiformcreate")
GUICtrlSetOnEvent ($func_create, "funcgen")
GUICtrlSetOnEvent ($button_create, "buttongen")
GUICtrlSetOnEvent ($label_create, "labelgen")
GUICtrlSetOnEvent ($input_create, "inputgen")
GUICtrlSetOnEvent ($send_create, "sendgen")
GUICtrlSetOnEvent ($num_ok, "randgen")
GUICtrlSetOnEvent ($app_ok, "apprungen")
GUICtrlSetOnEvent ($onevent_create, "oneventinstrgen")
GUICtrlSetOnEvent ($if_create, "ifgen")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$osv = (@OSVersion)

If @OSVersion = ("WIN_XP") Then
$osv = ("Windows XP")
EndIf

If @OSVersion = ("WIN_7") Then
$osv = ("Windows 7")
EndIf

If @OSVersion = ("WIN_2008R2") Then
$osv = ("Windows Server 2008 R2")
EndIf

If @OSVersion = ("WIN_2008") Then
$osv = ("Windows Server 2008")
EndIf

If @OSVersion = ("WIN_VISTA") Then
$osv = ("Windows Vista")
EndIf

If @OSVersion = ("WIN_2003") Then
$osv = ("Windows Server 2003")
EndIf

If @OSVersion = ("WIN_XPe") Then
$osv = ("Windows XPe")
EndIf

If @OSVersion = ("WIN_2000") Then
$osv = ("Windows 2000")
EndIf

GUICtrlSetData ($osversion, "Posiadasz system "&$osv)

$ossp = (@OSServicePack)

If @OSServicePack = ("") Then
$ossp = ("system bez bez dodatku")
EndIf

GuiCtrlSetData ($osservicepack, "Posiadasz "&$ossp)

GUICtrlSetData ($func_instr, "Instrukcje do funkcji")
GuiCtrlSetData ($code, "")
GuiCtrlSetData ($if_instr, "Instrukcje do wykonania")

While 1
Sleep (100)
WEnd

;***************************************************************FUNKCJE***************************************************************;

Func wyjdz()
MsgBox (48, "Wychodzę...", "Zajrzyj na http://autoit.MPCForum.pl"&@CRLF&@CRLF&"Dzięki za uzywanie mojego programu"&@CRLF&"Phoenix_PL"&@CRLF&@CRLF&"Nastąpi automatyczny zapis wygenerowanych poleceń do SciTE"&@CRLF&"Jesli w okienku nie ma kodu, to nic się nie stanie"&@CRLF&@CRLF&"Upewnij się ze masz włączonego SciTE!")
$tmp = _GUICtrlEdit_GetText ($code)
If $tmp = ("") then
Exit
EndIf
WinActivate ("[CLASS:SciTEWindow]")
Send ($tmp&@CRLF&";Skrypt wygenerowany przez AutoIT AutoSkyptera by Phoenix_PL")
Exit
EndFunc

Func helpmsg()
MsgBox (64, "Pomoc", "Flaga okna (Tworzenie okienka z informacją (MsgBox))"&@CRLF&"Flaga oznacza typ okna jakie zostaje wyswietlone, przykładowo to okienko ma flagę 64. Spis flag:"&@CRLF&"0 - Okno z przyciskiem OK"&@CRLF&"1 - Okno z przyciskiem OK i Anuluj"&@CRLF&"2 - Okno z przyciskami Przerwij, Ponów próbę i Ignoruj"&@CRLF&"3 - Okno z przyciskami Tak, Nie i Anuluj"&@CRLF&"4 - Okno z przyciskami Tak i Nie"&@CRLF&"5 - Okno z przyciskami Ponów próbę i Anuluj"&@CRLF&"6 - Okno z przyciskami Anuluj, Ponów próbę i Kontynuuj (UWAGA! Działa poprawnie tylko na systemach Windows 2000 i XP!)"&@CRLF&"0 - Okno bez ikony"&@CRLF&"16 - Okno z ikoną białego krzyzyka na czerwonym kole"&@CRLF&"32 - Okno z ikoną znaku zapytania w dymku"&@CRLF&"48 - Okno z ikoną wykrzyknika na zółtym trójkącie"&@CRLF&"64 - Okno z ikoną 'i' w dymku"&@CRLF&@CRLF&"Te liczby mozna łączyć, np. flaga 21 (16 + 5) wyswietli okno z białym krzyzykiem na czerwonym tle i przyciskami Ponów próbę i Anuluj."&@CRLF&"Pełna lista flag jest w pomocy SciTE, Indeks/MsgBox"&@CRLF&""&@CRLF&"Rozmiar/pozycja stworzonej kontrolki"&@CRLF&"W okienka gdzie trzeba wpisać rozmiar danej kontrolki naley wpisać:"&@CRLF&"Szerokosc, wysokosc, połozenie od gory, połozenie od lewa."&@CRLF&"Parametry oddzielamy przecinkami, i muszą to być cyfry."&@CRLF&""&@CRLF&"GUI Mozna tez tworzyć w programie KODA, który uruchamiamy klikając Alt + M w SciTE."&@CRLF&@CRLF&"Nazwa programu do uruchomienia:"&@CRLF&"Jesli aplikacja jest systemowa (typu notatnik, paint, pasjans, jest w folderze WINDOWS/system32), to nie trzeba podawać do niej sciezki. Ewentualną sciezke podajemy do FOLDERU w którym jest aplikacja."&@CRLF&""&@CRLF&"Klawisze do napisania"&@CRLF&"Klawisze piszemy normalnie, w (""""), ale jesli chcemy zrobić enter, to musimy zrobić takie cos:"&@CRLF&"Send (""pierwsza linijka""&@CRLF&""druga linijka."")"&@CRLF&"Jesli dany tekst ma być wysłany do notatnika, to musimy zamiasy @CRLF uzyc albo @CR albo @LF. Uzycie @CRLF w MsgBox'ie da taki sam efekt."&@CRLF&@CRLF&"Instrukcje warunkowe - warunki"&@CRLF&"Warunki instrukcji warunkowych mozemy dzielić słowami And i oraz Or."&@CRLF&"If warunek1 = true and warunek2 = true then - Jesli oba warunki sa prawdziwe, wykonuje instrukcje."&@CRLF&"If warunek1 = true or warunek2 = true then - jesli warunek1 albo warunek2 jest prawdziwy, wykonuje instrukcje."&@CRLF&""&@CRLF&"Mozna uzywać dowolnej ilosci warunków, i mozna tez stawiac jako warunek zawartosc zmiennej, np."&@CRLF&"If $zmienna = (""tekst"") then - jesli w zmiennej $zmienna jest tekst ""tekst"", wykonaj instrukcje."&@CRLF&""&@CRLF&"Dodawanie bibliotek"&@CRLF&"W okienko z nazwą biblioteki wpisujemy tylko nazwe pliku, bez rozszerzenia .au3 ani nawiasow <>."&@CRLF&"Biblioteka musi sie znajdowac w folderze Include w folderze z zainstalowanym AutoItem")
Sleep (100)
EndFunc

Func txttonotepad()
$tmp = _GUICtrlEdit_GetText ($code)
MsgBox (48, "Uwaga!", "Upewnij się ze masz włączonego SciTE!")
WinActivate ("[CLASS:SciTEWindow]")
Send ($tmp)
EndFunc

Func actonevent()
$tmp = ("Opt (""GuiOnEventMode"", 1)"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp)
EndFunc

Func inclib()
$tmp = ("#include <ButtonConstants.au3>"&@CRLF&"#include <EditConstants.au3>"&@CRLF&"#include <GUIConstantsEx.au3>"&@CRLF&"#include <StaticConstants.au3>"&@CRLF&"#include <WindowsConstants.au3>"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp)
EndFunc

Func clear()
$tmp = ("")
_GUICtrlEdit_SetText ($code, $tmp)
EndFunc

Func mousemovegen()
$tmpx = _GUICtrlEdit_GetText ($mouse_x)
$tmpy = _GUICtrlEdit_GetText ($mouse_y)
If $tmpx = ("") or $tmpy = ("") Then
MsgBox (16, "Błąd!", "Następnym razem wpisz współrzędne współrzędne!")
EndIf
$tmp = ("MouseMove ("&$tmpx&", "&$tmpy&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp)
EndFunc

Func mouseclickgen()
$tmpx = _GUICtrlEdit_GetText ($mouse_x)
$tmpy = _GUICtrlEdit_GetText ($mouse_y)
If $tmpx = ("") or $tmpy = ("") Then
MsgBox (16, "Błąd!", "Następnym razem wpisz współrzędne współrzędne!")
EndIf
$tmp = ("MouseClick ("&$tmpx&", "&$tmpy&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp)
EndFunc

Func sleepgen()
$tmp = _GUICtrlEdit_GetText ($sleep_time)
If $tmp = ("") Then
MsgBox (16, "Błąd!", "Następnym razem wpisz czas uspienia."&@CRLF&"Pamiętaj - czas jest w milisekundach (ms), a 1000 milisekund = 1 sekunda"&@CRLF)
EndIf
$tmp2 = ("Sleep ("&$tmp&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp2)
EndFunc

Func msgboxgen()
$tmp1 = _GUICtrlEdit_GetText ($msg_belka)
$tmp2 = _GUICtrlEdit_GetText ($msg_text)
$tmp3 = _GUICtrlEdit_GetText ($msg_type)
If $tmp1 = ("") or $tmp2 = ("") or $tmp3 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes któregos parametru! Następnym razem o nim pamiętaj!")
EndIf
$tmp4 = ("MsgBox ("&$tmp3&", """&$tmp1&""", """&$tmp2&""")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp4)
EndFunc

Func varcreate()
$tmp1 = _GUICtrlEdit_GetText ($zmienna_name)
$tmp2 = _GUICtrlEdit_GetText ($zmienna_zawart)
If $tmp1 = ("") or $tmp2 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes któregos parametru! Następnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("$"&$tmp1&" = "&$tmp2&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

Func incuserlib()
$tmp1 = _GUICtrlEdit_GetText ($lib_name)
If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nazwy biblioteki! Następnym razem o nim pamiętaj!")
EndIf
$tmp2 = ("#include <"&$tmp1&".au3>"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp2)
EndFunc

Func guiformcreate()
$tmp1 = _GUICtrlEdit_GetText ($form_id)
$tmp2 = _GUICtrlEdit_GetText ($form_belka)
$tmp3 = _GUICtrlEdit_GetText ($form_pos)
If $tmp1 = ("") or $tmp2 = ("") or $tmp3 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes któregos parametru! Następnym razem o nim pamiętaj!")
EndIf
$tmp4 = ("$"&$tmp1&" = GUICreate ("""&$tmp2&""", "&$tmp3&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp4)
EndFunc

Func funcgen()
$tmp1 = _GUICtrlEdit_GetText ($func_name)
$tmp2 = _GUICtrlEdit_GetText ($func_instr)
If $tmp1 = ("") or $tmp2 = ("") Then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("Func "&$tmp1&"()"&@CRLF&$tmp2&@CRLF&"EndFunc"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

Func buttongen()
$tmp1 = _GUICtrlEdit_GetText ($button_id)
$tmp2 = _GUICtrlEdit_GetText ($button_text)
$tmp3 = _GUICtrlEdit_GetText ($button_pos)
If $tmp1 = ("") or $tmp2 = ("") or $tmp3 = ("") Then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp4 = ("$"&$tmp1&" = GUICtrlCreateButton ("""&$tmp2&""", "&$tmp3&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp4)
EndFunc

Func labelgen()
$tmp1 = _GUICtrlEdit_GetText ($label_id)
$tmp2 = _GUICtrlEdit_GetText ($label_text)
$tmp3 = _GUICtrlEdit_GetText ($label_pos)
If $tmp1 = ("") or $tmp2 = ("") or $tmp3 = ("") Then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp4 = ("$"&$tmp1&" = GUICtrlCreateLabel ("""&$tmp2&""", "&$tmp3&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp4)
EndFunc

Func inputgen()
$tmp1 = _GUICtrlEdit_GetText ($input_id)
$tmp2 = _GUICtrlEdit_GetText ($input_text)
$tmp3 = _GUICtrlEdit_GetText ($input_pos)
If $tmp1 = ("") or $tmp2 = ("") or $tmp3 = ("") Then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp4 = ("$"&$tmp1&" = GUICtrlCreateInput ("""&$tmp2&""", "&$tmp3&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp4)
EndFunc

Func sendgen()
$tmp1 = _GUICtrlEdit_GetText ($send_keys)
If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes zadnych znaków do wpisania! Następnym razem o tym pamiętaj!")
EndIf
$tmp2 = ("Send ("""&$tmp1&""")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp2)
EndFunc

Func randgen()
$tmp1 = _GUICtrlEdit_GetText ($num_max)
$tmp2 = _GUICtrlEdit_GetText ($num_min)
If $tmp1 = ("") or $tmp2 = ("") Then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("Random ("&$tmp2&", "&$tmp1&")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

Func apprungen()
$tmp1 = _GUICtrlEdit_GetText ($app_name)
$tmp2 = _GUICtrlEdit_GetText ($apppath)
If $tmp1 = ("") or $tmp2 = ("") then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("Run ("""&$tmp1&""", """&$tmp2&""")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

Func oneventinstrgen()
$tmp1 = _GUICtrlEdit_GetText ($onevent_id)
$tmp2 = _GUICtrlEdit_GetText ($onevent_func)
If $tmp1 = ("") or $tmp2 = ("") then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("GUICtrlSetOnEvent ($"&$tmp1&", """&$tmp2&""")"&@CRLF)
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

Func ifgen()
$tmp1 = _GUICtrlEdit_GetText ($if_warns)
$tmp2 = _GUICtrlEdit_GetText ($if_instr)
If $tmp1 = ("") or $tmp2 = ("") then
MsgBox (16,  "Błąd!", "Nie wpisałes któregos parametru! Nastepnym razem o nim pamiętaj!")
EndIf
$tmp3 = ("If "&$tmp1&" Then"&@CRLF&$tmp2&@CRLF&"EndIf")
_GUICtrlEdit_AppendText ($code, $tmp3)
EndFunc

 

 

Minecraft Server Manager (program ułatwiający zarządzanie minecraftowym serwerem, dodatkowe pliki tutaj: Minecraft Server Manager.zip)

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=1.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt ('GUIOnEventMode', 1)
#Region ### START Koda GUI section ### Form=c:\documents and settings\wojtek_admin\moje dokumenty\autoit\mcservermanager\mcsm.kxf
$mcsm = GUICreate("Minecraft Server Manager", 786, 408, 192, 114)
$bangroup = GUICtrlCreateGroup("Banowanie", 0, 0, 185, 137)
$nick_ban = GUICtrlCreateInput("Nick do zbanowania", 8, 16, 169, 21)
$ban = GUICtrlCreateButton("Zbanuj nick", 8, 40, 171, 25)
$ip_ban = GUICtrlCreateInput("IP do zbanowania", 8, 80, 169, 21)
$banip = GUICtrlCreateButton("Zbanuj IP", 8, 104, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$pardongroup = GUICtrlCreateGroup("Odbanowywanie", 192, 0, 185, 137)
$nick_pardon = GUICtrlCreateInput("Nick do odbanowania", 200, 16, 169, 21)
$pardon = GUICtrlCreateButton("Odbanuj nick", 200, 40, 171, 25)
$ip_pardon = GUICtrlCreateInput("IP do odbanowania", 200, 80, 169, 21)
$pardonip = GUICtrlCreateButton("Odbanuj IP", 200, 104, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$kickgroup = GUICtrlCreateGroup("Wykopywanie", 0, 144, 185, 73)
$nick_kick = GUICtrlCreateInput("Gracz do wykopania", 8, 160, 169, 21)
$kicknick = GUICtrlCreateButton("Wykop gracza", 8, 184, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$opgroup = GUICtrlCreateGroup("Opowanie/deopowanie", 192, 144, 185, 105)
$playernick = GUICtrlCreateInput("Nick gracza", 200, 160, 169, 21)
$opplayer = GUICtrlCreateButton("Daj OP'a graczowi", 200, 184, 171, 25)
$deopplayer = GUICtrlCreateButton("Zabierz OP'a graczowi", 200, 216, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$tpgroup = GUICtrlCreateGroup("Teleportacja", 384, 0, 185, 97)
$nick_tp1 = GUICtrlCreateInput("Nick gracza - celu", 392, 16, 169, 21)
$nick_tp2 = GUICtrlCreateInput("Nick gracza do teleportacji", 392, 40, 169, 21)
$tp = GUICtrlCreateButton("Teleportuj", 392, 64, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$givegroup = GUICtrlCreateGroup("Daj surowce", 384, 104, 185, 121)
$give_player = GUICtrlCreateInput("Nick gracza", 392, 120, 169, 21)
$give_id = GUICtrlCreateInput("ID surowca", 392, 144, 169, 21)
$give_num = GUICtrlCreateInput("Liczba surowców", 392, 168, 169, 21)
$give = GUICtrlCreateButton("Daj graczowi surowce", 392, 192, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$tellgroup = GUICtrlCreateGroup("Szeptanie", 0, 224, 185, 169)
$nick_tell = GUICtrlCreateInput("Nick gracza", 8, 240, 169, 21)
$tell = GUICtrlCreateButton("Szepnij", 8, 360, 171, 25)
$tell_msg = GUICtrlCreateEdit("", 8, 264, 169, 89)
GUICtrlSetData(-1, "Wiadomosć do szepnięcia")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$saygroup = GUICtrlCreateGroup("Wyslij wiadomosć serwerową", 192, 256, 185, 137)
$say_msg = GUICtrlCreateEdit("", 200, 272, 169, 81)
GUICtrlSetData(-1, "Wiadomosć do wysłania")
$say = GUICtrlCreateButton("Wyslij wiadomosć", 200, 360, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$timegroup = GUICtrlCreateGroup("Czas", 384, 232, 185, 161)
$time_get = GUICtrlCreateInput("Czas", 392, 248, 169, 21)
$time_add = GUICtrlCreateButton("Dodaj czas", 392, 280, 171, 25)
$time_set = GUICtrlCreateButton("Ustaw czas", 392, 312, 171, 25)
$time_day = GUICtrlCreateButton("Zrób dzień", 392, 360, 171, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$knc = GUICtrlCreateButton("Wyjscie", 576, 376, 203, 25)
$readmeopen = GUICtrlCreateButton("Otwórz plik ReadMe", 576, 312, 203, 25)
$list = GUICtrlCreateButton("Pokaż listę graczy na serwerze", 576, 144, 203, 25)
$save = GUICtrlCreateButton("Zapisz mapę", 576, 240, 203, 25)
$saveon = GUICtrlCreateButton("Włącz auto-zapis mapy", 576, 176, 203, 25)
$saveoff = GUICtrlCreateButton("Wyłącz auto-zapis mapy", 576, 208, 203, 25)
$servhelp = GUICtrlCreateButton("Wyswietl liste komend w konsoli serwera", 576, 112, 203, 25)
$servactive = GUICtrlCreateButton("Przełącz na serwer", 576, 272, 203, 25)
$servstop = GUICtrlCreateButton("Zatrzymaj serwer", 576, 72, 203, 25)
$idopen = GUICtrlCreateButton("Otwórz obraz z ID przedmiotów", 576, 344, 203, 25)
$servexecute = GUICtrlCreateButton("Uruchom serwer", 576, 40, 203, 25)
$serverpath = GUICtrlCreateInput("Scieżka do serwera", 576, 8, 137, 21)
$searchpath = GUICtrlCreateButton("Przegladaj", 720, 8, 59, 25)
GUICtrlSetOnEvent ($knc, "a")
GUICtrlSetOnEvent ($ban, "b")
GUICtrlSetOnEvent ($banip, "c")
GUICtrlSetOnEvent ($pardon, "d")
GUICtrlSetOnEvent ($pardonip, "e")
GUICtrlSetOnEvent ($kicknick, "f")
GUICtrlSetOnEvent ($opplayer, "g")
GUICtrlSetOnEvent ($deopplayer, "h")
GUICtrlSetOnEvent ($tp, "i")
GUICtrlSetOnEvent ($give, "j")
GUICtrlSetOnEvent ($tell, "k")
GUICtrlSetOnEvent ($say, "l")
GUICtrlSetOnEvent ($time_add, "m")
GUICtrlSetOnEvent ($time_set, "n")
GUICtrlSetOnEvent ($time_day, "o")
GUICtrlSetOnEvent ($readmeopen, "p")
GUICtrlSetOnEvent ($idopen, "q")
GUICtrlSetOnEvent ($servstop, "r")
GUICtrlSetOnEvent ($searchpath, "s")
GUICtrlSetOnEvent ($servexecute, "t")
GUICtrlSetOnEvent ($list, "u")
GUICtrlSetOnEvent ($servhelp, "v")
GUICtrlSetOnEvent ($saveon, "w")
GUICtrlSetOnEvent ($saveoff, "x")
GUICtrlSetOnEvent ($save, "y")
GUICtrlSetOnEvent ($servactive, "z")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

HotKeySet ("c", "_clear")
MsgBox (0, "Info", "Uruchomiono program"&@CRLF&"Kliknij 'c' zeby wyczyscić wszystkie pola")

While 1
Sleep (100)
WEnd

;##########***************************FUNKCJE***************************##########;

Func _clear()
GUICtrlSetData ($nick_ban, "")
GUICtrlSetData ($nick_kick, "")
GUICtrlSetData ($nick_pardon, "")
GUICtrlSetData ($nick_tell, "")
GUICtrlSetData ($nick_tp1, "")
GUICtrlSetData ($nick_tp2, "")
GUICtrlSetData ($ip_ban, "")
GUICtrlSetData ($ip_pardon, "")
GUICtrlSetData ($playernick, "")
GUICtrlSetData ($give_id, "")
GUICtrlSetData ($give_num, "")
GUICtrlSetData ($give_player, "")
GUICtrlSetData ($tell_msg, "")
GUICtrlSetData ($say_msg, "")
GUICtrlSetData ($time_get, "")
EndFunc

Func a()
If WinExists ("[CLASS:ConsoleWindowClass]") And (MsgBox (36, "Pytanie", "Wyłączyć serwer?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("save-all {ENTER}stop {ENTER}")
EndIf
Exit
EndFunc

Func b()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GuiCtrlRead ($nick_ban)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka do odbanowania!")
EndIf

If $tmp1 = ("") = False Then
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz zbanować nick '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("ban "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
EndIf

If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func c()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 =  GUICtrlRead ($ip_ban)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes IP do zbanowania!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz zbanować IP '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("ban-ip "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf

If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func d()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($nick_pardon)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka do odbanowania!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz odbanować nick '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("pardon "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func e()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($ip_pardon)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes IP do odbanowania!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz odbanować IP '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("pardon-ip "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func f()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($nick_kick)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka do wykopania!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz wykopać gracza '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("kick "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func g()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($playernick)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka do dania mu op'a!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz dać op'a nickowi '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("op "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func h()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($playernick)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka do odebrania mu op'a!")
EndIf

If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz zabrać op'a nickowi '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("deop "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func i()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($nick_tp1)
$tmp2 = GUICtrlRead ($nick_tp2)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka osoby-celu!")
EndIf

If $tmp2 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka osoby do teleportacji!")
EndIf

If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz przeteleportować gracza '"&$tmp1&"' do gracza '"&$tmp2&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("tp "&$tmp1&" "&$tmp2&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func j()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($give_player)
$tmp2 = GUICtrlRead ($give_id)
$tmp3 = GUICtrlRead ($give_num)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka gracza, dla którego mają być surowce!")
EndIf

If $tmp2 = ("") And (MsgBox (17, "Błąd!", "Nie wpisałes ID przedmiotu! Kliknij OK zeby otworzyć obraz z ID przedmiotów.")=1) Then
ShellExecute (@ScriptDir&"\itemlist.png")
EndIf

If $tmp3 = ("") Then
$tmp3 = ("64")
EndIf

If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz dać "&$tmp3&" surowca o ID "&$tmp2&" graczowi '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("give "&$tmp1&" "&$tmp2&" "&$tmp3&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func k()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($nick_tell)
$tmp2 = GUICtrlRead ($tell_msg)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes nicka osoby do której chcesz szeptać!")
EndIf

If $tmp2 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes wiadomosci do szepnięcia!")
EndIf

If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz szeptać do gracza '"&$tmp1&"'?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("tell "&$tmp1&" "&$tmp2&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func l()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($say_msg)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes wiadomosci do wysłania!")
EndIf

WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("say "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func m()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($time_get)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes czasu do dodania!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz dodać do czasu "&$tmp1&"?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("time add "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func n()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
$tmp1 = GUICtrlRead ($time_get)

If $tmp1 = ("") Then
MsgBox (16, "Błąd!", "Nie wpisałes czasu do ustawienia!")
EndIf
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz ustawić czas na "&$tmp1&"?")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("time set "&$tmp1&"{ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func o()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("time set 0 {ENTER}")
WinActivate ("Minecraft Server Manager")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func p()
ShellExecute (@ScriptDir&"\ReadMe.txt")
EndFunc

Func q()
ShellExecute (@ScriptDir&"\itemlist.png")
EndFunc

Func r()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
If (MsgBox (36, "Uwaga!", "Czy na pewno chcesz wyłączyć swój serwer??")=6) Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("save-all {ENTER}stop {ENTER}")
If (MsgBox (36, "Pytanie", "Czy chcesz tez wyłączyć MC Server Managera?")=6) Then
Exit
EndIf
EndIf
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func s()

$tmp1 = FileOpenDialog ("Przeglądaj w poszukiwaniu serwera Minecraft", @DesktopDir, "Plik wykonywalny serwera (*.bat)", 3)
$tmp2 = StringReplace ($tmp1, "|", @CRLF)
GUICtrlSetData ($serverpath, $tmp2)
EndFunc

Func t()
$tmp1 = GUICtrlRead ($serverpath)

If $tmp1 = ("") or $tmp1 = ("Scieżka do serwera") Then
MsgBox (16, "Błąd!", "Najpierw wybierz sciezkę do serwera!")
EndIf

ShellExecute ($tmp1)
WinActivate ("Minecraft Server Manager")
EndFunc

Func u()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("list {ENTER}")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func v()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("help {ENTER}")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func w()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("save-on {ENTER}")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func x()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("save-off {ENTER}")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func y()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
Sleep (100)
Send ("save-all {ENTER}")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

Func z()
If WinExists ("[CLASS:ConsoleWindowClass]") Then
WinActivate ("[CLASS:ConsoleWindowClass]")
EndIf
If WinExists ("[CLASS:ConsoleWindowClass]") = False Then
MsgBox (16, "Błąd!", "Najpierw włącz serwer!!")
EndIf
EndFunc

 

 

Spamer (spamuje wiadomościami :D)

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt ("GuiOnEventMode", 1)
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Wojtek_Admin\Moje dokumenty\AutoIt\MT2AutoLogin\form.kxf
$Form1 = GUICreate("Spamer", 145, 189, 192, 114)
$txt = GUICtrlCreateInput("", 8, 32, 121, 21)
$ilosc = GUICtrlCreateInput("", 8, 80, 121, 21)
$Label1 = GUICtrlCreateLabel("Tekst:", 8, 8, 34, 17)
$Label2 = GUICtrlCreateLabel("Ile razy go wysłać?", 8, 56, 95, 17)
$spam = GUICtrlCreateButton("Spamuj", 8, 112, 123, 25)
$quit = GUICtrlCreateButton("Wyjdź", 8, 144, 123, 25)
GUISetOnEvent ($GUI_EVENT_CLOSE, "_end")
GUICtrlSetOnEvent ($spam, "_spam")
GUICtrlSetOnEvent ($quit, "_end")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Func _end()
Exit
EndFunc

Func _spam()
$i1 = GUICtrlRead ($txt)
$i2 = GUICtrlRead ($ilosc)
If $i1 = "" or $i2 = "" or (StringIsInt ($i2)) = False Then
MsgBox (16, "Błąd!", "Nieprawidłowe dane!")
Exit
EndIf
MsgBox (48, "Uwaga!", "Masz 10 sekund aby przełączyć się na okno do zaspamowania!")
Sleep (10000)
While $i2 > 0
Send ($i1&"{ENTER}")
$i2 = $i2 - 1
WEnd
EndFunc

While 1
Sleep (100)
WEnd

 

 

Wygląda na to, że tyle. Jeśli napiszę jeszcze jakiś, to wstawię tutaj. Oczywiście, to nie są wszystkie skrypty co do jednego jakie stworzyłem :)

 

I macie zajęcie: piszcie co o nich myślicie, i co w nich można poprawić

846331404756772371599.jpeg

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...